<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=urf-8">
<title>手动发送短信</title>
	<%@include file="../include/include.jsp"%>
	<link rel="stylesheet" type="text/css" href="${csspath}/public.css"/>
	<link rel="stylesheet" type="text/css" href="${csspath}/datepicker.css"/>
	<link rel="stylesheet" type="text/css" href="${csspath}/style_l.css"/>
	<script type="text/javascript" src="${jspath}/jquery/jquery-1.8.3.js"></script>
	<script type="text/javascript" src="${jspath}/jquery/jquery.ui.min.js"></script>
	<script type="text/javascript" src="${jspath}/ui.datepicker_zh-CN.js"></script>
	<script type="text/javascript" src="${jspath}/jquery/jquery.blockUI.js"></script>
	<script type="text/javascript" src="${jspath}/public.js"></script>
	<script type="text/javascript" src="${jspath}/jquery/jquery.ui.draggable.js"></script>
	<script type="text/javascript" src="${jspath}/jquery/jquery.alerts.js"></script>
	<link rel="stylesheet" type="text/css" href="${csspath}/jquery.alerts.css" />
	
	<script src="${jspath}/jquery/validate/jquery.validationEngine.js" type="text/javascript"></script>
<script src="${jspath}/jquery/validate/jquery.validationEngine-zh.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="${webcontext}/css/validationEngine.jquery.css"/>
<link rel="stylesheet" type="text/css"
	href="${bootstrapPath}/css/bootstrap.css" />
<script type="text/javascript" src="${bootstrapPath}/js/bootstrap.js"></script>
<script type="text/javascript" src="${layerPath}/layer.js"></script>
<script type="text/javascript"
	src="${bootstrapPath}/js/bootstrap3-validation.js"></script>
	
	<script type="text/javascript">
	$(function(){
		$("#send").click(function() {
			$.ajax({
	            type: "POST",
	            url : '${webcontext}/crmdp/dealer/masterdata/sendMessage',
	            dataType: "html",
	            data: $("#search_form").serialize(),
	            success: function (data) {
	            	if(data){
	            		layer.alert('发送成功！', {
	        			    icon: 2,
	        			    offset:['20px', '350px']
	        			})
	            	}else{
	            		layer.alert('发送失败！', {
	        			    icon: 2,
	        			    offset:['20px', '350px']
	        			})
	            	}
	            },
	            error: function () {
	            	layer.alert("请求失败,请重试！", {
					    icon: 2,
					    offset : ['250px', '350px']
					});
	            }
	        });
		});
	})
	</script>
</head>
<body>
	<!-- content -->
	<div id="content">
		<!-- wrap -->
		<div id="wrap">
	<form:form id="search_form" action="#" method="post">
		<div class="spliter h_5"></div>
		<div class="btn_div">
			<button id="send" type="button" class="btn" value="发送" ><i class="glyphicon glyphicon-ok" style="color:#FFFFFF"></i>&nbsp;发送</button>
		</div>
	</form:form>

		</div>
		<!-- /wrap -->
	</div>
	<!-- /content -->
</body>
</html>